#ifndef TMROSNODEHANDLE_H
#define TMROSNODEHANDLE_H

#include <QObject>
#include <QThread>

#include <string>
#include <ros/ros.h>
#include <sensor_msgs/JointState.h>
#include <tf/transform_broadcaster.h>

#include "UdpReceive.h"


typedef struct _ANGLE_ROS_PUB_TYPE_
{
    double p;
    double v;
    double r;
    uint32_t time;
}S_AngleRosPubType;

class TmRosNodeHandle : public QThread
{
    Q_OBJECT
public:

    TmRosNodeHandle();
    ~TmRosNodeHandle()
    {
        ;
    }

signals:
    void SnNodePublic(char which, S_AngleRosPubType data);

private:
    ros::NodeHandle *mpRosNodeHandle;
    ros::Publisher *mpJointPub;

    // message declarations
    sensor_msgs::JointState *mpJointState;

    void run() override;
};

#endif // TMROSNODEHANDLE_H
